import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;

package org.example;

public class WeiBo {
        private String registerNum;
        private String info;
        private String followNum;
        private String followInfo;

        public String getRegisterNum() {
                return registerNum;
        }

        public void setRegisterNum(String registerNum) {
                this.registerNum = registerNum;
        }

        public String getInfo() {
                return info;
        }

        public void setInfo(String info) {
                this.info = info;
        }

        public String getFollowNum() {
                return followNum;
        }

        public void setFollowNum(String followNum) {
                this.followNum = followNum;
        }

        public String getFollowInfo() {
                return followInfo;
        }

        public void setFollowInfo(String followInfo) {
                this.followInfo = followInfo;
        }

        @Override
        public String toString() {
                return "WeiBo{" +
                        "registerNum='" + registerNum + '\'' +
                        ", info='" + info + '\'' +
                        ", followNum='" + followNum + '\'' +
                        ", followInfo='" + followInfo + '\'' +
                        '}';
        }
}
package org.example;

        import java.util.HashSet;
        import java.util.Scanner;
public class Main2 {
        private static class Teacher {
                @Override
                public String toString() {
                        return "Teacher{" +
                                "number='" + number + '\'' +
                                ", name='" + name + '\'' +
                                ", sex='" + sex + '\'' +
                                '}';
                }

                private String number;
                private String name;
                private String sex;

                public Teacher(String number, String name, String sex) {
                        this.number = number;
                        this.name = name;
                        this.sex = sex;
                }
        }

        public static void main(String[] args) {
                HashSet<Teacher> set = new HashSet<>();
                set.add(new Teacher("001", "a", "man"));
                set.add(new Teacher("002", "b", "man"));
                set.add(new Teacher("003", "c", "woman"));
                System.out.println(set);
        }

        }

